<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>学生选课信息管理系统</title>
  <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
  <link rel="stylesheet" href="https://unpkg.com/layui@2.6.8/dist/css/layui.css" />
  <script src="https://unpkg.com/layui@2.6.8/dist/layui.js"></script>
  <script src="https://code.jquery.com/jquery-3.6.0.min.js" type="text/javascript"></script>

</head>
<body>
<div class="layui-layout layui-layout-admin">
  <div class="layui-header">
    <div class="layui-logo layui-hide-xs layui-bg-black">学生选课系统</div>
    <!-- 头部区域（可配合layui 已有的水平导航） -->

    <ul class="layui-nav layui-layout-right">
      <li class="layui-nav-item layui-hide layui-show-md-inline-block">
        <a href="javascript:;">
          <img src="https://iconfont.alicdn.com/t/b3bb28bd-1cf2-4869-8701-985093ebe0ff.png"
               class="layui-nav-img">
          管理员
        </a>
        <dl class="layui-nav-child">
          <dd><a href="">修改密码</a></dd>
          <dd><a href="javascript:;">查看个人信息</a></dd>
        </dl>
      </li>
      <li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
        <a href="javascript:;">
          <i class="layui-icon layui-icon-more-vertical"></i>
        </a>
      </li>
    </ul>
  </div>

  <div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
      <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
      <ul class="layui-nav layui-nav-tree" lay-filter="test" id="left-nav">

        <li class="layui-nav-item layui-nav-itemed">
          <a class="" href="javascript:;">学生管理</a>
          <dl class="layui-nav-child">
            <dd><a _href="${pageContext.request.contextPath}/student/allStudent" href="javascript:;">学生信息查看</a></dd>
            <dd><a _href="" href="javascript:;">学生选课</a></dd>
          </dl>
        </li>

        <li class="layui-nav-item"><a href="javascript:;">课程管理</a>
          <dl class="layui-nav-child">
          <dd><a _href="" href="javascript:;">课程信息查看</a></dd>
          </dl>
        </li>
      </ul>
    </div>
  </div>

  <div class="layui-body">
    <iframe id="content" src='${pageContext.request.contextPath}/student/allStudent' frameborder="0"
            scrolling="yes" style="width:98%;height:98%;margin:1%"></iframe>
  </div>

  <div class="layui-footer"style="text-align: center">
    <!-- 底部固定区域 -->
    <span >  @姚承</span>

  </div>
</div>

<script>
  //JS
  layui.use(['element', 'layer', 'util'], function() {
    var element = layui.element,
            layer = layui.layer,
            util = layui.util,
            $ = layui.$;

    //头部事件
    util.event('lay-header-event', {
      //左侧菜单事件
      menuLeft: function(othis) {
        layer.msg('展开左侧菜单的操作', {
          icon: 0
        });
      },
      menuRight: function() {
        layer.open({
          type: 1,
          content: '<div style="padding: 15px;">处理右侧面板的操作</div>',
          area: ['260px', '100%'],
          offset: 'rt' //右上角
          ,
          anim: 5,
          shadeClose: true
        });
      }
    });

    //菜单点击切换事件
    $('#left-nav a').click(function(event) {
      var _href = $(this).attr("_href");
      $('#content').attr('src', _href);
      //$("#content").src=";
    });
  });
</script>
